<template>
	<view class="content">
			<view class="fact_title">
				重庆泛贝仙食品有限公司
			</view>
			<view class="rental_title">
				<text>计算周期</text>
				<text>缴费金额（元）</text>
			</view>
			<view class="postings basic">
				<view class="post_con" v-for="(item,index) in data" :key="index">
					<text>{{item.receiptTime}}</text>
					<text>{{item.receiptAmount}}</text>
				</view>
			</view></view>
</template>

<script>
	export default {
		data() {
			return {
				data:[],
				billId:0
			};
		},
		onLoad(option) {
			this.billId = option.billId
			this.getInfo(this.billId)
		},
		methods: {
			// getTitle(title) {
			// 	uni.setNavigationBarTitle({
			// 		title: title
			// 	});
			// }
			
			getInfo(billId){
				let that=this
				//联网加载数据
				this.apis.businessApi.sfReceiptDetailList(billId).then(res => {
					this.data=res.rows
				}).catch(()=>{
					//联网失败的回调,隐藏下拉刷新的状态
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
$subheadColor:#111111;
$titleColor:#333333;
@mixin boldTitle {
	font-size: 28rpx;
	font-weight: 500;
	color: #666666;
}
@mixin  bordcon {
	font-size: 28rpx;
	color: #333333;
}
@mixin  padding {
	padding: 30rpx 0;
}
.content{
	// padding: 20rpx;
	box-sizing: border-box;
	.fact_title{
		background: #FFFFFF;
		text-align: center;
		font-size: 28rpx;
		font-weight: 400;
		color: #333333;
		padding-bottom: 20rpx;
		margin-bottom: 20rpx;
	}
	.rental_title{
		display: flex;
		justify-content: space-between;
		padding: 26rpx 32rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #666666;
		background: #FFFFFF;
		margin-bottom: 10rpx;
	}
	.postings{
		display: flex;
		flex-direction: column;
		background: #FFFFFF;
		padding: 0 32rpx;
		margin-bottom: 20rpx;
		box-sizing: border-box;
		.post_title{
			@include bordcon
			@include padding
			border-bottom: 1rpx solid #EEEEEE;
		}
		.post_con{
			display: flex;
			justify-content: space-between;
			@include padding
			text:nth-child(1){
				@include boldTitle
			}
			text:nth-child(2){
				@include bordcon
			}
			// 待租
			.rent{
				color: #F74D39 !important;
			}
			// 已租
			.occupancy{
				color: #44D94B !important;
			}
		}
	}
	.basic{
		.post_title{
			display: flex;
			justify-content: space-between;
			@include bordcon
			@include padding
			text:nth-child(2){
				@include boldTitle
			}
		}
		.post_con{
			display: flex;
			justify-content: space-between;
			border-bottom: 1rpx solid #EEEEEE;
			@include padding
			text:nth-child(1){
				@include boldTitle
			}
			text:nth-child(2){
				@include bordcon
			}
		}
		view:last-child{
			border-bottom: none;
		}
	}
}
</style>
